<template>
	<view class="content">
		<button @click="handLogin">ces</button>
		<button class="cu-btn login-btn" open-type="getPhoneNumber" @getphonenumber="phoneChange">授权手机号登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {
			
		},
		methods: {
			phoneChange(e) {
				if (!e.detail?.encryptedData) {
					this.$u.toast('未授权手机号 登陆失败')
					return
				}
				console.log(e)
			},
			handLogin() {
				uni.login({
					success: (res) => {
						console.log(res)
					}
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
